import React from 'react';
import ModalForm from '../../../components/modalForm';

export default function Editor(props) {
    const { isNew } = props;
    let config = {};
    if (!isNew) {
        config.id = {
            label: 'ID',
            input: {
                disabled: true,
            },
        };
    }

    config = {
        ...config,
        name: {
            label: '名称',
        },
    };

    return (
        <ModalForm
            {
                ...{
                    ...props,
                    config,
                }
            }
        />
    );
}
